Fix current-bidi-paragraph-direction and its doc.
authorEli Zaretskii <eliz@gnu.org>
Wed, 24 Aug 2011 11:49:54 +0000 (14:49 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 24 Aug 2011 11:49:54 +0000 (14:49 +0300)
 src/xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
 buffers, return left-to-right.
 doc/lispref/display.texi (Bidirectional Display): Document return value in
 buffers that are not bidi-reordered for display, and in unibyte
 buffers.

doc/lispref/ChangeLog
doc/lispref/display.texi
src/ChangeLog
src/xdisp.c

index b400964f33b0cd2b42a1997dd18a5d92a81ec216..db85e5606bda45094d08d01251dc22e7e5ea9a14 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * display.texi (Bidirectional Display): Document return value in
+       buffers that are not bidi-reordered for display, and in unibyte
+       buffers.
+
 2011-08-23  Eli Zaretskii  <eliz@gnu.org>
 
        * nonascii.texi (Character Properties): Document the values for
index 8f7f40034114cc95e45d76db7b0c9c8b3dd2cfb1..0593eba8f05bc3e0560e5d03d8b6916c076accc4 100644 (file)
@@ -6104,7 +6104,9 @@ omitted or @code{nil}, it defaults to the current buffer.  If the
 buffer-local value of the variable @code{bidi-paragraph-direction} is
 non-@code{nil}, the returned value will be identical to that value;
 otherwise, the returned value reflects the paragraph direction
-determined dynamically by Emacs.
+determined dynamically by Emacs.  For buffers whose value of
+@code{bidi-display-reordering} is @code{nil} as well as unibyte
+buffers, this function always returns @code{left-to-right}.
 @end defun
 
 @cindex layout on display, and bidirectional text
index 8d44dfc6d8891eb9c3cca628a0b882d4abb29bbc..e5246f4b9dac78471ab360ac489bb3fa8646808c 100644 (file)
@@ -1,5 +1,8 @@
 2011-08-24  Eli Zaretskii  <eliz@gnu.org>
 
+       * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
+       buffers, return left-to-right.
+
        * bidi.c (bidi_check_type): Use xassert.
        (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
        members.
index 6a11628f858814d3d863a54d7e2ac12084dc5eef..8b3a71027b6000723ba49c92e33831a27f40a282 100644 (file)
@@ -19014,7 +19014,8 @@ See also `bidi-paragraph-direction'.  */)
       buf = XBUFFER (buffer);
     }
 
-  if (NILP (BVAR (buf, bidi_display_reordering)))
+  if (NILP (BVAR (buf, bidi_display_reordering))
+      || NILP (BVAR (buf, enable_multibyte_characters)))
     return Qleft_to_right;
   else if (!NILP (BVAR (buf, bidi_paragraph_direction)))
     return BVAR (buf, bidi_paragraph_direction);